//
//  Ext+UIImageView.swift
//  SwiftDemoWithSina
//
//  Created by qu on 2017/1/17.
//  Copyright © 2017年 Apple. All rights reserved.
//

import UIKit
import SDWebImage

extension UIImageView {
    
    convenience init(imageName:String) {
        self.init(image : UIImage(named: imageName))
    }
    
    //封装了一层SD
    func setImage(urlString:String?){
        
        self.sd_setImage(with: URL(string: urlString ?? ""), placeholderImage: self.image)
    }
    
}
